package com.zhku.shop.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zhku.base.model.PageParams;
import com.zhku.base.model.PageResult;
import com.zhku.shop.model.dto.QueryShopParamsDto;
import com.zhku.shop.model.dto.ShopDto;
import com.zhku.shop.model.po.TtShop;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author itcast
 * @since 2023-12-21
 */
public interface TtShopService extends IService<TtShop> {

    /**
     * 创建店铺
     * @param shopDto
     * @return
     */
    public TtShop createShop(ShopDto shopDto);

    /**
     * 删除店铺
     * @param id
     */
    public void deleteShop(String id);

    /**
     * 修改店铺
     * @param ttShop
     * @return
     */
    public TtShop updateShop(TtShop ttShop);

    /**
     * 根据店铺id查询店铺
     * @param id
     * @return
     */
    public TtShop getShop(String id);

    /**
     * 分页查询店铺信息
     * @param pageParams
     * @param queryShopParamsDto
     * @return
     */
    public PageResult<TtShop> queryShopList(PageParams pageParams, QueryShopParamsDto queryShopParamsDto);

    /**
     * 根据店铺名称查询当前店铺是否存在
     * @param name
     * @return
     */
    TtShop shopByName(String name);
}
